using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;
using Common;

namespace Converters
{
	public class CrossTalkBackgroudMultiConverter : IMultiValueConverter
	{
		public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
		{
			if (values.Length == 2 && values[0] != null && values[0] != DependencyProperty.UnsetValue && values[0] is string && values[1] != null && values[1] != DependencyProperty.UnsetValue && values[1] is int && values[0].ToString().IndexOf(values[1].ToString()) != -1)
			{
				return new SolidColorBrush(SLANDefine.Color_Gray);
			}
			return null;
		}

		public object[] ConvertBack(object value, Type[] targetType, object parameter, CultureInfo culture)
		{
			return null;
		}
	}
}
